<html>
<head>
<title>The Assignments Menu</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td width="100%">
			<table width="100%" height="78" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="topnav">
			<tr>
				<!-- Header Side -->
				<td width="17">
					<img height="78" src="media/reportico100.png"/>
				</td>
				<td align="right"></td>
				<td align="center">
					<table width="100%" height="60" border="0" align="left" cellpadding="0" cellspacing="0">
						<tr>
							<td valign="top" align="left">
							<img src="media/repbanner.png"/></td>
							</td>
						</tr>
						<tr>
							<td align="center" valign="bottom" class="topmenucell">
								<nobr>
								&nbsp;
								</nobr>
							</td>
						</tr>
					</table>
				</td>
				<td width="103" class="toplogincell">
					&nbsp;
				</td>
			</tr>
			</table>
</td>
  </tr>
  <!--tr>
    <td class="header_top">reportico</td>
  </tr-->
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_reportico.html" class="menu">class tree: reportico</a> ]
		  [ <a href="../elementindex_reportico.html" class="menu">index: reportico</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_reportico.html">reportico</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.pkg.html">Reportico Tutorial And User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.manual.pkg.html">Reportico User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.quickstart.pkg.html">Reportico Installation</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.gettingstarted.pkg.html">Getting Started</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.structure.pkg.html">Reportico Installation Structure</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.using.pkg.html">Configuring Reportico - System Parameters</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.embedding.pkg.html">Embedding Reportico</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.security.pkg.html">Reportico Security</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.language.pkg.html">Language Support</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.projects.pkg.html">Projects</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.importlink.pkg.html">Importing and linking from reports</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.menus.pkg.html">Report Menus</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.prepare.pkg.html">Report Preparation and Execution</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.design.pkg.html">Report Design Mode</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.format.pkg.html">The Design Format Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.customcode.pkg.html">Custom Source Code</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.qrydet.pkg.html">The Query Details Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.assign.pkg.html">The Assignments Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.criteria.pkg.html">The Criteria Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.output.pkg.html">The Output Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.webservices.pkg.html">Turning Reports into Web Services (currently unavailable)</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.faq.pkg.html">Reportico FAQ</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.howto.pkg.html">Reportico Tutorial</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1.pkg.html">Tutorial No.1 - The Film Listing Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_1.pkg.html">Tutorial 1 Stage 1 - Creating a basic report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_2.pkg.html">Tutorial 1 Stage 2 - Creating User Entry Criteria</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_3.pkg.html">Tutorial 1 Stage 3 - Working with expressions using assignments</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_4.pkg.html">Tutorial 1 Stage 4 - Working with groups</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_5.pkg.html">Tutorial 1 Stage 5 - Including database graphics into the report and generating drilldowns</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial2_1.pkg.html">Tutorial 2 - Creating the loan history report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial3_1.pkg.html">Tutorial 3 - The Monthly Returns Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial4_1.pkg.html">Tutorial 4 - The Late Returns Summary report</a>
</ul>
</li></ul>
</li></ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix1.pkg.html">Appendix 1 - Reportico Project Configuration parameters</a>
</ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix2.pkg.html">Appendix 2 - Reportico URL request parameters</a>
</ul>

									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../reportico/_reportico.php.html">		reportico.php
		</a><br>
	  </div><br />
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../reportico/tutorial_reportico.qrydet.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../reportico/tutorial_reportico.criteria.pkg.html">Next</a></td>
</tr>
</table>
<span><a name="tutorial.assign"></a><h2 class="title">The Assignments Menu</h2><a name="assign.assoverview"></a><h3 class="title">Assignment Menu Overview</h3><p>The Assignment Menu allows the setting up of additional calculations
    that can be included in the report. Calculations are entered as straight
    PHP code and can perform the following :-</p>

    <p><strong class = "bold">Note that assignment code may not be
      entered when running in SAFE mode as the user could create SQL
      statements here that could delete and update data in the
      database. For instructions on how to turn on and off Safe Mode see the <a href="../reportico/tutorial_reportico.security.pkg.html">Reportico Security</a> section.</strong></p>

    <ol><li><p>Reformat a column, such as left-padding a number with zeros,
        truncating a string column, extracting the time from a datetime value,
        converting to uppercase, embedding HTML tags to change the colour
        etc.</p></li>

      <li><p>Concatenate column values together into one</p></li>

      <li><p>Use special functions that provide line number, the previous
        value of a column, and whether a column has changed</p></li>

      <li><p>Provide rolling sums for use in report trailers</p></li>

      <li><p>Provide group sums for use in report trailers</p></li>

      <li><p>Provide in line report images</p></li></ol>

    <p>Assignments involve selecting the report column (whether this is a
    manually added column or not) , providing an expression to assign to
    assign to that column and an optional test condition which if true for any
    line of the report will perform the assignment.</p>

    <p>Assignments are executed during report generation and are applied in
    the order specified in this menu. Therefore assignments can be chained.
    For example. a column may be a concatenation of two others but in the next
    assignment that same column may be blanked out if a particular condition
    is met.</p><hr />

  <a name="assign.AssignName"></a><h3 class="title">Assignment Menu Attributes</h3><a name="assign.AssignName.AssignName"></a><h4 class="title">Assign To Existing Column</h4><p>The name of the column being assigned to. This must be an existing
      column either present in the main report query or manually added using
      the Add button in the Query Columns sub tab off the query Details
      menu.</p><br />

    <a name="assign.AssignName.AssignNameNew"></a><h4 class="title">Assign To New Column</h4><p>The name of a new column to assign to. Entering a value here will generate a new column in the report output which shows the results of the assignment. To change attributes of this column , such as width, justification etc, edit the column settings within the Query Details-?&gt;Query Columns menu option.</p><br />

    <a name="assign.AssignName.Expression"></a><h4 class="title">Expression</h4><p>The expression to assign to the column. This must follow PHP
      syntax but to include a column value in the assignment then enter the
      column name surrounded by {} (curly brackets). So to include the column
      <strong class = "bold">orderno</strong> in the assignment, use the
      notation <strong class = "bold">{orderno}</strong>. The following built
      in functions</p>

      <p>The following special built in functions exist :-</p>

      <p></p>

      <ol><li><p>lineno(&quot;groupname&quot;)</p>

          <p>Returns the current report line number. If groupname is passed
          then returns the current line number within that group. The
          groupname must relate to a group as set up in the Group sub tab
          within the Output menu</p></li>

        <li><p>old({columnname})</p>

          <p>Returns the value for the column for the previous line in the
          report. Useful for comparisons and specialised cumulative
          calculations</p></li>

        <li><p>sum({columnname},&quot;groupname&quot;}</p>

          <p>Returns the rolling sum for a particular column within the
          group if a groupname is specified.</p></li>

        <li><p>min({columnname},&quot;groupname&quot;)</p>

          <p>Returns the rolling minimum value for a column and by group if
          groupname is specified</p></li>

        <li><p>max({columnname},&quot;groupname&quot;)</p>

          <p>Returns the rolling maximum value for a column and by group if
          groupname is specified</p></li>

        <li><p>avg({columnname},&quot;groupname&quot;)</p>

          <p>Returns the rolling average value for a column and by group if
          groupname is specified</p></li>

        <li><p>imagequery(&quot;SELECT image FROM table WHERE key =
          &quot;.{image_id})</p>

          <p>Fetches a database graphic held in table column image from
          table WHERE column key = the value of report column image_id. The
          above syntax will be fine if key is a numeric column, however you
          will need to provide necessary quotes if not.</p></li>

        <li><p>changed({columnname})</p>

          <p>Returns true is the column value for the current report line
          has changed since the previous line. Useful in condition
          tests.</p></li></ol>

      <p>Examples:-</p>

      <p></p>

      <ol><li><p>Assigns literal text to a stock status column, if stock level
          too low</p>

          <p><table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Condition</td></tr></thead>

                <tbody><tr><td>stockstatus</td>

                    <td>'Out of Stock'</td>

                    <td>{stocklevel} == 0</td></tr></tbody></table></p></li>

        <li><p>Pads an order number with zeros to a length or 4 digits using
          standard PHP str_pad function<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Condition</td></tr></thead>

                <tbody><tr><td>orderno</td>

                    <td>str_pad({orderno},4,&quot;0&quot;,STR_PAD_LEFT)</td></tr></tbody></table></p></li>

        <li><p>Concatenates first and second names together<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Explanation</td></tr></thead>

                <tbody><tr><td>fullname</td>

                    <td>{first_name}.&quot; &quot;.{last_name}</td>

                    <td></td></tr>

                  <tr><td>last_name</td>

                    <td>{first_name}.&quot; &quot;.{last_name}</td>

                    <td>This is the same but will replace the last_name
                    column with first and last name concatenated. This may be
                    preferable to creating a manual column to hold it. Then
                    first_name can be hidden to ensure the report just shows
                    the full name.</td></tr></tbody></table></p></li>

        <li><p>Report Line Number with trailing period &quot;.&quot; using built in
          lineno function.<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Condition</td></tr></thead>

                <tbody><tr><td>count</td>

                    <td>lineno().&quot;.&quot;</td></tr></tbody></table></p></li>

        <li><p>Rolling sum,minimum, maximum and averages<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Condition</td></tr></thead>

                <tbody><tr><td>min_order_value</td>

                    <td>min({order_value})</td>

                    <td></td></tr>

                  <tr><td>max_order_value</td>

                    <td>max({order_value})</td>

                    <td></td></tr>

                  <tr><td>avg_order_value</td>

                    <td>avg({order_value})</td>

                    <td></td></tr>

                  <tr><td>total_order_value</td>

                    <td>sum({order_value})</td>

                    <td></td></tr>

                  <tr><td>last_order_value</td>

                    <td>old({order_value})</td></tr></tbody></table></p></li>

        <li><p>Group sum, minimum etc. Second parameter passed is name of a
          group that must have been set up on the Group entry
          menu.<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Condition</td></tr></thead>

                <tbody><tr><td>total_cust_order</td>

                    <td>sum({order_value},&quot;customer&quot;)</td>

                    <td></td></tr>

                  <tr><td>latest_order_by_customer</td>

                    <td>max({order_date},&quot;customer&quot;)</td>

                    <td></td></tr>

                  <tr><td>avg_country_temperature</td>

                    <td>avg({temperature},&quot;country&quot;)</td>

                    <td></td></tr>

                  <tr><td>latest_customer_order</td>

                    <td>max({order_date},&quot;customer&quot;)</td>

                    <td></td></tr>

                  <tr><td>earliest_customer_date</td>

                    <td>min({order_date},&quot;customer&quot;)</td>

                    <td></td></tr></tbody></table></p></li>

        <li><p>Includes a database graphic from the database.<table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                    <td align = "center">Expression</td>

                    <td align = "center">Explanation</td></tr></thead>

                <tbody><tr><td>flag_image</td>

                    <td>imagequery(&quot;SELECT image FROM country where
                    country_code ='&quot;.{country_code}.&quot;'&quot;,50)</td>

                    <td>Assumes that a country flag graphic is in the
                    country table as a BINARY/BLOB type in column image. The
                    imagequery function performs the select statement for the
                    relevant country_code value on each line and places the
                    resultant image against the flag_image column.<p>Note
                    that the column attributes for flag_image must have
                    content Type set to graphic for the image to appear within
                    PDF reports.</p></td></tr></tbody></table></p></li></ol>

      <p></p><br />

    <a name="assign.AssignName.Condition"></a><h4 class="title">Condition</h4><p>A condition that must be met in for the assignment to be made.
      This takes the form of a PHP condition clause, and like the assign to
      section allows the embedding of report column values. So for example,
      you may wish to clear a column value if another column is set to a
      particular value or even show a value in red if it exceeds or is less
      than a particular value ( only works in HTML reports though ).</p>

      <p>Examples</p>

      <p><table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                <td align = "center">Expression</td>

                <td align = "center">Condition</td></tr></thead>

            <tbody><tr><td>freegift</td>

                <td>'Free Gift!!!'</td>

                <td>{order_value} &gt; 100</td></tr></tbody></table></p>
      <p><table border = "1"><colgroup span = "3"/><thead><tr><td align = "center">Assign To</td>

                <td align = "center">Style Option: text colour</td>

                <td align = "center">Condition</td></tr></thead>

            <tbody><tr><td>stocklevel</td>

                <td>#ff0000</td>

                <td>{stock_level} &lt; 10</td></tr></tbody></table></p><br /><hr />

  <h3 class="title">Image URL Wizard</h3><p><strong>Note only valid in HTML output.</strong></p>
<p>Assigns an image to a report column.</p>
    <a name="assign.AssignImageUrl"></a><h4 class="title">Image URL</h4><p>Enter a URL path to an image. This can be a fully pathed image beginning with http:// or a path to an image relative to the PHP script execution directory (in most cases relative to the reportico directory). You can include a column value into the image url by using the {} notation. Therefore if you have column called <strong>priority</strong> which had values red, green or amber then you could enter here images/{priority}.png which would get evaluated at run time.</p><br /><hr />

  <h3 class="title">Hyperlink Wizard</h3><p>Allows a clickable link to be embedded in a report column.</p>
    <a name="assign.AssignHyperlinkLabel"></a><h4 class="title">HyperLink Label</h4><p>This is what will be displayed in the report output. You can put a string, for example click, or you can enter a column value usign the &quot;{}&quot; notation which means that column value will be displayed but will be clickable.</p><br />
    <a name="assign.AssignHyperlinkUrl"></a><h4 class="title">Hyperlink URL</h4><p>Enter a URL path to open when clicked. You may include column values within the link so that different URLs are called depending on the values in the report. So if you had a supplier name column and another with a supplier website you could set the label to {supplier_name} and a hyperlink URL of {supplier_website}.</p><br /><hr />

  <h3 class="title">Output Styles Wizard</h3><p>Allows colours, borders, font settings to be set for different elements of report output. Styles can be applied to report body, report data, column headers, column rows, and each data cell. Note that some styes have no effect on certain report elements and any of the styles are not supported in PDF mode.</p>
    <p>In PDF output, page and report body styles are not supported. Borders are only ever 1 pixel thick. In HTML mode most style settings do have an effect but there are some circumstances where unexpected effects may occur.</p>
    <p>Several styles may be chosen in a single assisgnment, however only one output element my be assigned to in a single assignment. Assignments are additional, meaning that you can assign, for example a background color to a row in one assignment and then create another assignment setting the text color to rows and both styles will be applied. Styles can therefore be set across multiple assignments. If a condition is specified, then cell styles are only applied if the condition is met.</p>
    <a name="assign.AssignStyleLocType"></a><h4 class="title">Apply Style To</h4><p>Select whether to apply the style(s) to a specific cell (the one mentioned in the <strong>Assign/Assign to New Column</strong>), all individual cells in a row, the whole row, the page, the whole report body, group headers group trailers or column headers.</p><br />
    <a name="assign.AssignStyleFgColor"></a><h4 class="title">Text Colour</h4><p>The text colour. Enter a stylesheet colour, this must be in the format #rrggbb. For example, #ff0000 is red.</p><br />
    <a name="assign.AssignStyleBgColor"></a><h4 class="title">Background Colour</h4><p>The background colour. Used to colour fill the background of a whole row, a cell, the whole page etc. Using this it is possible to provide different colours on alternating rows. To do this create an assignment of type Row Style and chose one colour.  Then add another assignment of type Row Style and choose another background colour but in the condition field put in</p>
        <p><code><pre>
        lineno() % 2 == 1
</pre></code></p>
     <p>This is PHP code that divides the current data line by 2 and checks if the remainder is 1 meaning its true on every odd line number. The style will then be applied on every other line. You could use the same concept to give a different colour on each set of 3 consecutive lines.</p><br />
    <a name="assign.AssignStyleBorderStyle"></a><h4 class="title">Border Style</h4><p>Indicates whether to draw a border around the selected element. In PDF mode, dotted and dashed lines appear as solid lines. The default &quot;No Border&quot; means no action is taken, but a value of &quot;None&quot; means do not display a border. So you could set a border around every cell using the &quot;All Cells In Row&quot; option and then use this option to turn off border for a single cell.</p><br />
    <a name="assign.AssignStyleBorderSize"></a><h4 class="title">Background Thickness</h4><p>Indicates the thickness of the border line. Can indicate to draw all sides of a border or individually select to draw just the top, left, right or bottom borders using the CSS notation of up to 4 space separated values ( you can use the px, cm, mm and em notations just as in CSS ). A value of <strong>0 0 2px 0</strong> does a 2 pixel underline</p><br />
    <a name="assign.AssignStyleBorderColor"></a><h4 class="title">Border Colour</h4><p>Use the HTML format of #rrggbb to indicate the colour of the border</p><br />
    <a name="assign.AssignStyleMargin"></a><h4 class="title">Margin</h4><p>Specify up to 4 values, in CSS format (see border thickness above), to indicate a margin to apply to the top, right, bottom and left respectively of the element applied to. Useful for setting margin of report body, offsetting the report data. Not supported in PDF format yet.</p><br />
    <a name="assign.AssignStylePadding"></a><h4 class="title">Padding</h4><p>Specify up to 4 values, in CSS format (see border thickness above), to indicate a padding surround space to apply to the top, right, bottom and left respectively of the element applied to. Useful for setting adding space before a row (not that padding must be applied to &quot;all cells&quot; to create extra space above or below a line, not the row).</p><br /><hr />

  <h3 class="title">Aggregates Wizard</h3><p>Reportico allows you to create rolling sums, averages, minimums, maximums, line numbers and access values from the previous line to assist in your assignments. This section is a quick way to generate your aggregate expressions. After adding an aggregate column you the value will appear in each line and change on each line as the value gets summed, averaged etc. You can hide the column in Query Details-&gt;Query Columns and show the aggregate only at the end using the group trailers. After selecting your aggregate values and pressing Ok, you will see the aggregate expression generated in the assignment's Expression text box.</p>
    <a name="assign.AssignAggType"></a><h4 class="title">Aggregate Type</h4><p>The type of aggregate. One of Sum, Average, Minimum, Maximum, Previous and Count. Sum, average, minimum and maximum maintain in the assignment column a rolling aggregate of the column specified in the <strong>Aggregate Column</strong> value below. <strong>Previous</strong> populates the assignment column with the value of the specified <strong>Aggregate Column</strong> from the previous row of report output - useful for doing calculations on the difference in values between lines. The <strong>Count</strong> function gives the current report line number, or if a group is specified then it gives the number of lines printed within the specified group. <strong>Skip Line</strong> causes the current line to be omitted from the report line and no further assignments made for the line. Normally used with a condition, so for example lines with a blank value in a column could be ignored if a condition is used such as</p>
        <p><code><pre>
        !{columnvalue}
</pre></code></p><br />
    <a name="assign.AssignAggCol"></a><h4 class="title">Aggregate Column</h4><p>The report output column being aggregated.</p><br />
    <a name="assign.AssignAggGroup"></a><h4 class="title">Grouped By</h4><p>The name of the column on which the aggregate should be reset to null. If your report contains groups then you will probably want to reset the aggregate on each change of the relevant group. Leave blank if aggregate is to be maintained through the whole report.</p><br /><hr />

  <h3 class="title">Database Graphic Wizard</h3><p>Reportico allows you include graphics from your database into the report output. Normally graphics are stored in databases as BLOB types, say. Tables containing images usually have an integer key to refer to them. To show a graphic, you should select the key id as one of the column names in your main select. Then in this section you specify the column and table name where the image resides. This will allow the relevant SELECT to be built up when rendering the image to the browser. After entering the values and pressing Ok here you will see an expression generated which passes the relevant SELECT statement to image_query. Check that this looks ok before proceeding.</p>
    <a name="assign.AssignGraphicBlobCol"></a><h4 class="title">Column Containing Graphic</h4><p>The name of the database column in your media/blob table which contains the image binary.</p><br />
    <a name="assign.AssignGraphicBlobTab"></a><h4 class="title">Table Containing Graphic</h4><p>The name of the database table containing the image binary.</p><br />
    <a name="assign.AssignGraphicBlobMatch"></a><h4 class="title">Column to Match Report Graphic</h4><p>The name of the column in your media/blob table which contains the key value.</p><br />
    <a name="assign.AssignGraphicWidth"></a><h4 class="title">Report Graphic Width</h4><p>The width to render the image as in the report in pixels. Must be specified.</p><br />
    <a name="assign.AssignGraphicReportCol"></a><h4 class="title">Graphic Report Column</h4><p>The source report column name which contains the image key value you want to look up in the databases blob/graphic table.</p><br /><hr />

  <a name="assign.DrilldownReport"></a><h4 class="title">Drill Down</h4><p>Reportico allows you do include an HTML link in you report output lines which can drill down to another Reportico report
passing through selected report line output as criteria. For example if you had report giving you a list of customers and another giving you
a list of invoices, then in each line of the customer report you can include an HTML link which runs the invoice report for the relevant customer.</p>
      <p>This is achieved by creating an assignment to a new column. The column is assigned a string of an HTML link containing a url definition passing through as parameters the project, the report definition file you wish to run and the relevant report line values you want to use as criteria. This is in effect what you do when you run a report directly specifying criteria in the URL instead of in the criteria entry screen.</p>
      <p>Drilldown is quite tricky and can involve a bit of fiddling to get it right as the assignment expression is often a complex PHP string definition. However the Assignments page provides a feature to get your assignment started.</p>
      <p>At the bottom of the Assignments page you will see a section named 'Drilldown' as follows :-
    <img src = "../media/R_17.png"/></p>
      <p>Here you can choose the report to be run whenever you click the link. Choose the report and press Ok. Then scroll to the bottom of the assignments page again and you will see a drop down box for each criteria item that report accepts. For example :-
    <img src = "../media/R_16.png"/></p>
      <p>Then for each criteria item that you want to provide data for from the report (you wont probably populate all of these boxes) you need to specify the column from the source reports whose value should be passed to the target report. Leave blank any that are not relevant. The column you choose in each list box should have a value equivalent to the target criteria item's <strong class = "bold">Summary Column</strong>. Note that there may be other criteria you want to pass to the report which are not provided in the target report line and must be passed manually. This is done by performing the steps further down. Note that if you are passing date values to date type crtieria items the format of your date value must conform to your database date format, probably YYYY-MM-DD if you are using MySQL. If it does not then you may need to create another report column which can be hidden which is formatted correctly.</p>
      <p>Once you are happy you have chose click Ok and you should now see a PHP string expression in the <strong class = "bold">Expression</strong> text box. This will evaluate in the report output to an HTML &lt;a&gt; tag containing your URL and which will appear in the report as the word 'Drill' which will be clickabel. You may now change this expression to add in extra criteria or change the word Drill to something else or even a link to a drill icon that you may have.</p>
      <p>To add more criteria you need to know the name of the criteria item in the target report and you just include in the URL definition something like &amp;MANUAL_{criteria_name}=value. If you want to specify a date or date ranges then that you can specify dates or use identifiers such as TODAY,TOMORROW,YESTERDAY,FIRSTOFMONTH,LASTOFMONTH,FIRSTOFLASTMONTH,LASTOFLASTMONTH. For a single date criteria you would need to include something like &amp;MANUAL_{criteria_name}=TODAY or &amp;MANUAL_{criteria_name}=2012-01-01. For a date range you would include something like &amp;MANUAL_{criteria_name}_FROMDATE=FIRSTOFMONTH&amp;MANUAL_{criteria_name}_TODATE=LASTOFMONTH. For more information on passing URL parameters or Date identifiers see  <a href="../reportico/tutorial_reportico.using.pkg.html">Configuring Reportico - System Parameters</a></p>
      <p>If you do modify your drilldown expression then you must be careful with the PHP syntax as its quite hard to make sense of the quotes and concatenation dot characters. You will soon see if you have a syntax error when you run the report.</p>
      <p>Once you have a link appearing, then clicking on it will run the target report in a browser page. You should see the full URL used in the address bar. If you have any problems then you can check this for any clues.</p><br /><hr /></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../reportico/tutorial_reportico.qrydet.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../reportico/tutorial_reportico.design.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../reportico/tutorial_reportico.criteria.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">The Query Details Menu</td>
<td width="34%" align="center" valign="top">Report Design Mode</td>
<td width="33%" align="right" valign="top">The Criteria Menu</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 09 Jun 2014 18:10:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>